3.10 \(\int \frac {\cos ^3(x)}{a+b \csc (x)} \, dx\)

Optimal. Leaf size=61 \[ \frac {b \sin ^2(x)}{2 a^2}-\frac {b \left (a^2-b^2\right ) \log (a \sin (x)+b)}{a^4}+\frac {\left (a^2-b^2\right ) \sin (x)}{a^3}-\frac {\sin ^3(x)}{3 a} \]

[Out]

-b*(a^2-b^2)*ln(b+a*sin(x))/a^4+(a^2-b^2)*sin(x)/a^3+1/2*b*sin(x)^2/a^2-1/3*sin(x)^3/a

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3872, 2837, 12, 772} \[ \frac {\left (a^2-b^2\right ) \sin (x)}{a^3}-\frac {b \left (a^2-b^2\right ) \log (a \sin (x)+b)}{a^4}+\frac {b \sin ^2(x)}{2 a^2}-\frac {\sin ^3(x)}{3 a} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]^3/(a + b*Csc[x]),x]

[Out]

-((b*(a^2 - b^2)*Log[b + a*Sin[x]])/a^4) + ((a^2 - b^2)*Sin[x])/a^3 + (b*Sin[x]^2)/(2*a^2) - Sin[x]^3/(3*a)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 772

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegr
and[(d + e*x)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IGtQ[p, 0]

Rule 2837

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {\cos ^3(x)}{a+b \csc (x)} \, dx &=\int \frac {\cos ^3(x) \sin (x)}{b+a \sin (x)} \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {x \left (a^2-x^2\right )}{a (b+x)} \, dx,x,a \sin (x)\right )}{a^3}\\ &=\frac {\operatorname {Subst}\left (\int \frac {x \left (a^2-x^2\right )}{b+x} \, dx,x,a \sin (x)\right )}{a^4}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2 \left (1-\frac {b^2}{a^2}\right )+b x-x^2+\frac {-a^2 b+b^3}{b+x}\right ) \, dx,x,a \sin (x)\right )}{a^4}\\ &=-\frac {b \left (a^2-b^2\right ) \log (b+a \sin (x))}{a^4}+\frac {\left (a^2-b^2\right ) \sin (x)}{a^3}+\frac {b \sin ^2(x)}{2 a^2}-\frac {\sin ^3(x)}{3 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 60, normalized size = 0.98 \[ \frac {-2 a^3 \sin ^3(x)+6 a \left (a^2-b^2\right ) \sin (x)+6 b \left (b^2-a^2\right ) \log (a \sin (x)+b)+3 a^2 b \sin ^2(x)}{6 a^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^3/(a + b*Csc[x]),x]

[Out]

(6*b*(-a^2 + b^2)*Log[b + a*Sin[x]] + 6*a*(a^2 - b^2)*Sin[x] + 3*a^2*b*Sin[x]^2 - 2*a^3*Sin[x]^3)/(6*a^4)

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 60, normalized size = 0.98 \[ -\frac {3 \, a^{2} b \cos \relax (x)^{2} + 6 \, {\left (a^{2} b - b^{3}\right )} \log \left (a \sin \relax (x) + b\right ) - 2 \, {\left (a^{3} \cos \relax (x)^{2} + 2 \, a^{3} - 3 \, a b^{2}\right )} \sin \relax (x)}{6 \, a^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*csc(x)),x, algorithm="fricas")

[Out]

-1/6*(3*a^2*b*cos(x)^2 + 6*(a^2*b - b^3)*log(a*sin(x) + b) - 2*(a^3*cos(x)^2 + 2*a^3 - 3*a*b^2)*sin(x))/a^4

________________________________________________________________________________________

giac [A]  time = 0.53, size = 62, normalized size = 1.02 \[ -\frac {2 \, a^{2} \sin \relax (x)^{3} - 3 \, a b \sin \relax (x)^{2} - 6 \, a^{2} \sin \relax (x) + 6 \, b^{2} \sin \relax (x)}{6 \, a^{3}} - \frac {{\left (a^{2} b - b^{3}\right )} \log \left ({\left | a \sin \relax (x) + b \right |}\right )}{a^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*csc(x)),x, algorithm="giac")

[Out]

-1/6*(2*a^2*sin(x)^3 - 3*a*b*sin(x)^2 - 6*a^2*sin(x) + 6*b^2*sin(x))/a^3 - (a^2*b - b^3)*log(abs(a*sin(x) + b)
)/a^4

________________________________________________________________________________________

maple [A]  time = 0.33, size = 64, normalized size = 1.05 \[ -\frac {\sin ^{3}\relax (x )}{3 a}+\frac {b \left (\sin ^{2}\relax (x )\right )}{2 a^{2}}+\frac {\sin \relax (x )}{a}-\frac {b^{2} \sin \relax (x )}{a^{3}}-\frac {b \ln \left (b +a \sin \relax (x )\right )}{a^{2}}+\frac {b^{3} \ln \left (b +a \sin \relax (x )\right )}{a^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(a+b*csc(x)),x)

[Out]

-1/3*sin(x)^3/a+1/2*b*sin(x)^2/a^2+sin(x)/a-1/a^3*b^2*sin(x)-b*ln(b+a*sin(x))/a^2+b^3/a^4*ln(b+a*sin(x))

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 60, normalized size = 0.98 \[ -\frac {2 \, a^{2} \sin \relax (x)^{3} - 3 \, a b \sin \relax (x)^{2} - 6 \, {\left (a^{2} - b^{2}\right )} \sin \relax (x)}{6 \, a^{3}} - \frac {{\left (a^{2} b - b^{3}\right )} \log \left (a \sin \relax (x) + b\right )}{a^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*csc(x)),x, algorithm="maxima")

[Out]

-1/6*(2*a^2*sin(x)^3 - 3*a*b*sin(x)^2 - 6*(a^2 - b^2)*sin(x))/a^3 - (a^2*b - b^3)*log(a*sin(x) + b)/a^4

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 58, normalized size = 0.95 \[ \sin \relax (x)\,\left (\frac {1}{a}-\frac {b^2}{a^3}\right )-\frac {{\sin \relax (x)}^3}{3\,a}+\frac {b\,{\sin \relax (x)}^2}{2\,a^2}-\frac {\ln \left (b+a\,\sin \relax (x)\right )\,\left (a^2\,b-b^3\right )}{a^4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(a + b/sin(x)),x)

[Out]

sin(x)*(1/a - b^2/a^3) - sin(x)^3/(3*a) + (b*sin(x)^2)/(2*a^2) - (log(b + a*sin(x))*(a^2*b - b^3))/a^4

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**3/(a+b*csc(x)),x)

[Out]

Timed out

________________________________________________________________________________________